﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using BookingSystemDAL;
using BookingSystemModel;

namespace BookingSystemBLL
{
    public class UserBLL
    {
        private static UserDAL userdal = new UserDAL();
        public UserBLL()
        {

        }
        //添加用户
        public static int AddUser(user User)
        {
            return userdal.AddUser(User);
        }
        //查询所有用户
        public static DataSet SearchUser()
        {
            return userdal.SearchUser();
        }
        //根据UserNickName查询用户
        public static  DataSet NickNameUser(string UserNickName)
        {
            return userdal.NickNameUser(UserNickName);
        }
        //登录用户验证
        public static DataSet loginUser(string UserName, string Pwd)
        {
            return userdal.loginUser(UserName, Pwd);
        }
        //管理员更新用户信息
        public static int UpdateUserInfo(user UserInfo)
        {
            return userdal.UpdateUserInfo(UserInfo);
        }
        //用户更改密码
        public static int UpdatePwd(string Pwd,string UserNickName)
        {
            return userdal.UpdatePwd(Pwd, UserNickName);
        }

    }
}
